/**
 * futures : masterlink.futures.dao.AccountDao.java
 */
package masterlink.futures.dao;

import java.util.List;

import masterlink.futures.vo.VolatilityComm;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/10/25
 * @version 1.0.0	
 */
@Repository
@Qualifier("AccountDao")
public class VolatilityDao extends TimesTenHibernateDao<VolatilityComm, VolatilityComm.PK> {
	
	private static final String FIND_ALL="from VolatilityComm order by id.date1 desc";
	private static final String FIND_BY_COMM="from VolatilityComm where id.comm=? order by id.date1 desc";
	
	@SuppressWarnings("unchecked")
	@Override
	public List<VolatilityComm> findAll() {
		return (List<VolatilityComm>) super.findByHql(FIND_ALL);
	}
	
	@SuppressWarnings("unchecked")
	public List<VolatilityComm> findByComm(String comm) {
		return (List<VolatilityComm>) super.findByHql(FIND_BY_COMM,comm);
	}
	
}
